<template>
  <div class="siderbar-contain">
    <router-link
      v-for="(item,index) in routerList"
      :key="index"
      :to="item.path"
      active-class="is-active"
      >
      <p>{{item.name}}</p>
    </router-link>
  </div>
  
</template>

<script>
export default {
  data(){
    return{
      routerList: []
    }
  },
  created(){
    this.routerList = this.$router.options.routes.slice(1)    
  }

}
</script>

<style lang="less">
.siderbar-contain{
  a{
    color: #000;
    text-decoration: none
  }
  .is-active{
    color: red;
  }

}

</style>